﻿namespace Model.Entites
{
    /// <summary>
    /// 留言管理
    /// </summary>
    [SugarTable("T_MsgCtrl")]
    public class TMsgCtrl : ModelStatusBase
    {
        #region 发布人

        /// <summary>
        /// 留言来源
        /// </summary>
        public Enum_Source Source { get; set; }

        /// <summary>
        /// 留言来源描述
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string SourceDesc { get; set; }

        /// <summary>
        /// 发布人
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int? CustomerId { get; set; }

        /// <summary>
        /// 发布人
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(CustomerId))]
        public TCustomerinfo Customer { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Name { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Phone { get; set; }

        /// <summary>
        /// 电子邮箱
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Email { get; set; }

        /// <summary>
        /// 留言图片
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string Picture { get; set; }

        /// <summary>
        /// 留言描述
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT")]
        public string MsgDesc { get; set; }

        #endregion 发布人

        /// <summary>
        ///
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(TMsgCtrlHandle.MsgId))]
        public List<TMsgCtrlHandle> MsgCtrlHandles { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public DateTime? HandleTime { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string HandleDesc { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string HandleBy { get; set; }

        /// <summary>
        /// 处理图片
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string HandlePicture { get; set; }

        /// <summary>
        /// 处理附件
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string HandleAttachment { get; set; }
    }
}